package com.gandong8.hbase.web.exception;

import java.util.Map;

public class CommonException extends RuntimeException {

    private static final long serialVersionUID = -9185267668749159184L;

    private Map<String, String> data;

    private Integer code;

    public CommonException(String message)
    {
        super(message);
        this.code = 400;
    }

    public CommonException(String message, Integer code)
    {
        super(message);
        this.code = code;
    }

    public CommonException(String message, Integer code, Map<String, String> data)
    {
        super(message);
        this.code = code;
        this.data = data;
    }

    public Integer getCode()
    {
        return this.code;
    }

    public Map<String, String> getData()
    {
        return this.data;
    }
}
